Conversion of timestamps between multiple entities within a computing system

ABSTRACT

Method is described for converting received timestamps to a time-recording standard recognized by the receiving computing system. Embodiments of the invention generally include receiving data from an external device that includes a timestamp. If the received data is the first communication from the external device, creating a time base used for converting subsequently received timestamps to a recognized standard. Moreover, the system updates the time base if a counter failure at the external device is detected. When the external device transmits subsequent data, the time base is added to the subsequently received timestamps to convert the subsequent timestamps to a time-recording standard recognized by the computing system.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of co-pending U.S. patent applicationSer. No. 13/087,106, filed Apr. 14, 2011. The aforementioned relatedpatent application is herein incorporated by reference in its entirety.

BACKGROUND

The present invention generally relates to managing received data fromexternal devices, and more particularly, to converting timestampsassociated with the received data to a standard recognized by thereceiving computing system.

DESCRIPTION OF THE RELATED ART

Many modern computing systems lack enough expansion slots to satisfy theneed for I/O components and additional storage. Accordingly, computermanufactures may offer external I/O enclosures to satisfy this need.These external enclosures, for example, may provide additional I/Oexpansion slots for any number of hardware components such as anexternal/internal hard disk, peripheral component interconnect (PCI)card, PCI Express card, video card, or sound card. These hardwarecomponents are then connected to the computing systems (via the externalenclosure) to expand the capabilities of the computing system. However,these external enclosures may be unable to provide an accurate timestampwhen transmitting data to the computing system.

In addition to using the hardware components to expand the capabilitiesof the computing system, the hardware components may transmit statusinformation to the computer system, such as the component's temperature,type, energy consumption or functionality. If this periodically receivedstatus data is displayed to a user to illustrate a trend—e.g., theamount of energy consumed by the hardware component over a period oftime—then each received data point needs an accurate timestamp. However,as mentioned above, many external enclosures do not have the capabilityto determine the precise time of day (TOD) that data was transmitted toa computing system.

SUMMARY

Embodiments of the invention provide a method for converting a timestampbetween a computing system and a subsystem of the computing system byreceiving a relative timestamp from the subsystem. Once the methoddetermines that a time skew has occurred based on the relative timestampand a time base, the time base is updated, the time base being aconversion variable for converting the relative timestamp to an absolutetimestamp. If the time base is updated, the method determines theabsolute timestamp based on the relative timestamp and the updated timebase, the absolute timestamp being a timestamp of a time measure used bythe computing system. Conversely, if the time base is not updated, themethod determines the absolute timestamp based on the relative timestampand the time base.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

So that the manner in which the above recited aspects are attained andcan be understood in detail, a more particular description ofembodiments of the invention, briefly summarized above, may be had byreference to the appended drawings.

It is to be noted, however, that the appended drawings illustrate onlytypical embodiments of this invention and are therefore not to beconsidered limiting of its scope, for the invention may admit to otherequally effective embodiments.

FIGS. 1A-1B are block diagrams illustrating a system for receiving anddisplaying trending data, according to embodiments of the invention.

FIG. 2 is a flow chart illustrating a process which converts UNIX™ timeto a TOD format, according to embodiments of the invention

FIGS. 3A-3D are a series of timelines illustrating the relationship ofUNIX™ time variables, according to embodiments of the invention.

FIG. 4 is a flow chart illustrating the conversion of a receivedrelative timestamp to an absolute timestamp, according to embodiments ofthe invention.

DETAILED DESCRIPTION

In general, embodiments of the present invention convert a timestampbased on a subjective frame of reference to a timestamp based on arecognized standard. For example, an external I/O enclosure may beattached to a computing system to provide the system with additional I/Ocapabilities. However, the enclosure (i.e., a separate computing system)may not have the ability to record time according to the actual time ofday (TOD)—i.e., the day/month/year and hour/minute/second. Instead, theenclosure may record time according to an event specific to theenclosure such as when it was powered on. Accordingly, any data receivedfrom the enclosure will have a timestamp that corresponds to thatspecific event—i.e., a relative timestamp. The computing system, on theother hand, may be able to obtain the correct TOD from a permanentsource. Accordingly, the computing system may convert the receivedrelative timestamp to a timestamp that is based on the actual TOD.Converting an enclosure's timestamps permits the computing system todisplay received data in a TOD format which is familiar to a user.

To perform the conversion, the computing system establishes a conversionvariable (i.e., a time base) which can be used to convert a relativetimestamp of subsequently received data from the external enclosure to atimestamp that is relevant to the computing system. In some embodiments,the external enclosure contains a counter which sets the relativetimestamp. The time base may also be used to detect whether the counterhas reset, wrapped or drifted. Because the external enclosure typicallycannot detect when the counter has failed at maintaining an accuratetime (i.e., reset, wrapped, or drifted), the computing system updatesthe time base to ensure that data received before a counter failure maystill be correlated (e.g., placed on the same timeline) with data thatwas received after the failure.

In one embodiment, a computing system receives data from an external I/Oenclosure which may contain any number of hardware components. Thesehardware components expand the capabilities of the computing system byproviding additional memory or functions. Because the external enclosurecannot determine the actual TOD, it may record the number of secondsthat have passed since the enclosure was powered on—i.e., plugged in. Assuch, when the enclosure transmits data concerning the status of thehardware components to the computing system, it provides in the data arelative timestamp that discloses how many seconds have elapse since theenclosure was powered on.

Once the computing system receives the data with the timestamp, thesystem determines if this is the first communication received from theenclosure. If so, the computing system calculates a time base accordingto the received relative timestamp and the actual time the timestamp wasreceived. This time base may then be used for at least two purposes: (1)to convert subsequently received relative timestamps to absolutetimestamps which are correlated to the TOD or to the time measure usedby the system (e.g., UNIX™ time) and (2) to detect if a counter on theenclosure fails to provide an accurate relative timestamp whentransmitting subsequent updates. Specifically, the computing systemdetects whether such a failure has occurred using the time base and theactual time that is known to the computing system. If a significant timeskew is detected, the time base is recalculated using the new receivedrelative time and the actual time known to the system. In either case,the computing system then adds the appropriate time base to the relativetimestamp to yield an absolute timestamp. This absolute timestampcorresponds to the actual TOD that the status data was measured on thehardware component.

In the following, reference is made to embodiments of the invention.However, it should be understood that the invention is not limited tospecific described embodiments. Instead, any combination of thefollowing features and elements, whether related to differentembodiments or not, is contemplated to implement and practice theinvention. Furthermore, although embodiments of the invention mayachieve advantages over other possible solutions and/or over the priorart, whether or not a particular advantage is achieved by a givenembodiment is not limiting of the invention. Thus, the followingaspects, features, embodiments and advantages are merely illustrativeand are not considered elements or limitations of the appended claimsexcept where explicitly recited in a claim(s). Likewise, reference to“the invention” shall not be construed as a generalization of anyinventive subject matter disclosed herein and shall not be considered tobe an element or limitation of the appended claims except whereexplicitly recited in a claim(s).

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical storagedevice, a magnetic storage device, or any suitable combination of theforegoing. In the context of this document, a computer readable storagemedium may be any tangible medium that can contain, or store a programfor use by or in connection with an instruction execution system,apparatus or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

Embodiments of the invention may be provided to end users through acloud computing infrastructure. Cloud computing generally refers to theprovision of scalable computing resources as a service over a network.More formally, cloud computing may be defined as a computing capabilitythat provides an abstraction between the computing resource and itsunderlying technical architecture (e.g., servers, storage, networks),enabling convenient, on-demand network access to a shared pool ofconfigurable computing resources that can be rapidly provisioned andreleased with minimal management effort or service provider interaction.Thus, cloud computing allows a user to access virtual computingresources (e.g., storage, data, applications, and even completevirtualized computing systems) in “the cloud,” without regard for theunderlying physical systems (or locations of those systems) used toprovide the computing resources.

Typically, cloud computing resources are provided to a user on apay-per-use basis, where users are charged only for the computingresources actually used (e.g., an amount of storage space consumed by auser or a number of virtualized systems instantiated by the user). Auser can access any of the resources that reside in the cloud at anytime, and from anywhere across the Internet. In context of the presentinvention, a user may access systems (e.g., the external enclosure) orrelated data available in the cloud. For example, the external enclosurecould be located separately from the computing system within the cloud.In such a case, the external enclosure could send the data containingthe timestamps which are stored at a computing system in the cloud.Doing so allows a user to gain the benefit of the external enclosurefrom any computing system attached to a network connected to the cloud(e.g., the Internet).

FIGS. 1A-1B are block diagrams illustrating a system 100 for receivingand displaying trending data, according to one embodiment of theinvention. As shown in FIG. 1A, the system 100 includes a client system110, a network 150, a computing system 170, and an external enclosure120. In general, the computing system 170 receives data from hardwarecomponents located within the external enclosure 120 which providesadditional expansion slots and memory capabilities to the computingsystem 170. The received data may describe the status of hardwarecomponents hosted by the external enclosure 120 (e.g., the temperatureof the hardware component, energy consumed by the hardware component orthe functionality of the component).

Though the external enclosure 120 is shown as being capable of beinglocated separately from the computing system 170, the external enclosure120 may be located within the computing system 170. Further, anysubsystem of the computing system 170 that sends time stamped data, butlacks a real-time clock, may benefit from the techniques describedherein. For example, a micro-controller for a power supply of thecomputing system 170 may lack a real-time clock but need to generatetimestamps for updates regarding the temperature or energy consumptionof the power supply. Nonetheless, the micro-controller may deliverrelative timestamps to the computing system 170 which may then convertthe relative timestamps to a time measure used by that system 170.

The data transmitted from the external enclosure 120 to the computingsystem 170 may include a timestamp relative to an event occurring on theexternal enclosure 120 which may be used to show a trend in the statusof the hardware components—e.g., if the hardware component is consumingmore or less energy over a period of time. In one embodiment, thecomputing system 170 converts the relative timestamps to a timestampmeasured relative to a time base of the computing system 170. Theconverted timestamp is then transmitted—along with the trending data—viathe network 150 to the client system 110. The client system 110 can thendisplay the trending data, for example, on a timeline created by theconverted timestamps. In one embodiment, the trending data may bedisplayed on a monitor attached directly to the computing system 170.Moreover, the computing system 170 may use the status of the hardwarecomponents and timestamps in IBM®'s Active Energy Manager (AEM) tomeasure, monitor, and manage the energy consumed by the hardwarecomponent. In general, AEM extends the scope of energy management toenable a more complete view of energy consumption within the datacenterand may be used in IBM BladeCenter®, POWER, System x, and System zservers. Nonetheless, one of ordinary skill will recognize that thetimestamps discussed herein are not limited to correlating energymanagement data.

FIG. 1B further illustrates the external enclosure 120 and computingsystem 170 of FIG. 1A, according to one embodiment of the invention.Illustratively, the external enclosure 120 includes an oscillator 122,expanded I/O slots 124, memory 128 and an I/O Interface 138. Theoscillator 122 is a circuit used to measure time—e.g., seconds.Different types of oscillators 122 include LC oscillators, crystaloscillators, and ring oscillator. However, any oscillator may be usedwhich satisfies the description herein. Typically, the oscillator 122provides a periodic signal once the external enclosure is connected to apower source.

The expanded I/O slots 124 are found on the external enclosure 120 butprovide the computing system 170 with additional capabilities. Forexample, hardware components, such as external/internal hard disk,peripheral component interconnect (PCI) card, PCI Express card, videocard, sound card, read only memory (ROM), adapter, flash memory, orother types of volatile and/or non-volatile memory, may be connected tothe slots 124. In one embodiment, the expanded I/O slots 124 are treatedby the computing system 170 as if they were located internally.

The I/O interface 138 receives and transmits data between the externalenclosure 120 and the computing system 170. In one embodiment, thisconnection is facilitated by InfiniBand™ which is a switched fabriccommunications link used in high-performance computing and enterprisedata centers. The I/O interface 138, however, may be any interfacecapable of performing the functions described herein.

As shown, the memory 128 includes a counter 130, trending component 132and relative timestamp 134. The counter 130 detects the periodic signalproduced by the oscillator 122. For each cycle of the signal, thecounter 130 assigns a specific value of time to that period; forexample, one cycle of the signal may correspond to 1/1,000,000 of asecond (i.e., 1 MHz). Alternatively, a processor, such as a IBM POWERprocessor, (not shown) may be included in the external enclosure 120which has a time-base register that is driven at some multiple of theprocessor frequency. The counter 130 may use the information stored inthe time-base register to derive a relative time. In one embodiment, thecounter 130 records the amount of time, typically in seconds, that haspassed since the external enclosure was powered on and the oscillator122 began operating (i.e., a time relative to a specific event on theexternal enclosure 120). The trending data component 132 receivesinformation from a hardware component (e.g., a PCI card) attached to theexpanded I/O slots 124. In one embodiment, the information concerns thestatus of the hardware components (e.g., the component's temperature,energy consumption or functionality). The trending data component 132also associates a timestamp for this data by receiving the current countfrom the counter 130. In one embodiment, this timestamp is based on thetime that has elapsed since the external enclosure 120 was powered on,not on the actual TOD. Accordingly, the timestamp assigned using theoscillator 122 is referred to herein as a “relative timestamp.” Once thedata is collected and associated with a timestamp, the trending datacomponent 132 relays the information to the I/O interface 138 to betransmitted to the computing system 170. This trending data, with itsrelative timestamps, permits the computing system 170 to identify trendsin a hardware component's performance or condition.

The computing system 170 includes a computer processor 172, I/O busslots 174, memory 178 and a primary I/O interface 190. The computerprocessor 172 may be any processor capable of performing the functionsdescribed herein. The I/O bus slots 174 permit the addition of hardwarecomponents similar to the ones described in connection with the expandedI/O slots 124 on the external enclosure 120. The primary I/O interface190 also connects to the I/O interface 138 of the external enclosure 120and permits the computing system 170 to transmit data to, and receiveddata from, the external enclosure 120.

The memory 178 of the computing system 170 includes an operating system180 and a time conversion system 182. The operating system 180 may beany operating system capable of performing the functions describedherein. The time conversion system 182 receives the trending data froman external enclosure 120, converts the associated relative timestamp toan absolute timestamp, and may either transmit the trending data withthe absolute timestamp to the client system 110 or use the trending datain AEM. As used herein, an “absolute timestamp” generally refers toamount of time elapsed since a fixed reference point (i.e., a specificdate). The hardware components of computing system 170 may generallymeasure time relative to the fixed reference point. In one embodiment,this reference point is fixed according to UNIX™ Time (or POSIX time).In general, adding the absolute timestamp to the reference point yieldsthe TOD that a given timestamp was measured on the external enclosure120.

The time conversion system 182 includes a timestamp component 184, timebase 186 and absolute system time 187. The timestamp component 184converts received relative timestamps, updates the time base 186 andcompares the absolute timestamp (i.e., the converted relative timestamp)to the absolute system time 187. The time base 186 provides a conversionfactor used to change a relative timestamp to an absolute timestamp.That is, the first time the time base 186 is established, the time base186 is the amount of time that has elapsed (also measured in seconds)since the fixed reference point and when the external enclosure 120 waspowered on. Accordingly, adding the time base 186 (i.e., the amount oftime that has elapse since a fixed reference point and when theenclosure 120 was powered on) to any relative timestamp (i.e., theamount of time that has elapsed since the enclosure 120 was powered andstatus data was sent) yields the absolute timestamp. In one embodiment,comparing the absolute timestamp to the absolute system time determinesif the counter 130 has failed.

In one embodiment, multiple external enclosures 120 may be connected tothe computing system 170. In such a case, each enclosure 120 may have aseparate time base 186 maintained by the time conversion system 182.Moreover, an external enclosure 120 may have multiple time bases 186associated with it—i.e., the computing system 170 may use one time baseto determine the absolute time for some timestamps but use a differenttime base when converting subsequently received timestamps. This processwill be discussed in greater detail below with FIG. 3A-3D. The absolutesystem time 187 generally corresponds to an amount of time that haselapsed from the same reference point used to measure the time base 186.For clarity, the relative timestamp, absolute timestamp, time base 186,and absolute system time 187 may be measured in seconds though they arenot limited to such.

FIG. 2 is a flow chart illustrating a process to convert the number ofseconds that have elapsed from a reference point to a TOD format,according to embodiments of the invention. The UNIX™ Time Standard usesa reference point of Jan. 1, 1970. Any computing system 170 that followsthis standard calculates the number of seconds that have passed sinceJan. 1, 1970. As shown in FIG. 2, this process 200 begins at step 205 bythe occurrence of an event. In one embodiment, the event may be thehardware components sending updated status information to the trendingdata component 132, or the timestamp component 184 receiving the statusinformation from the external enclosure 120. At step 210, the numbers ofseconds that have elapsed since Jan. 1, 1970 is calculated. At step 215the number of seconds is added to Jan. 1, 1970. To change the format toa TOD, at step 220, the combined time is then converted to theappropriate day/month/year and hour/minutes/seconds. Advantageously, anytwo computing systems that use the UNIX™ Time Standard can timestamptransmitted data with the number of seconds that have elapsed since Jan.1, 1970, and the recipient will know precisely the TOD that thetimestamp occurred. Table 1 illustrates several examples of UNIX™ timemeasurements (e.g., absolute timestamps or absolute system time 187) andthe corresponding TOD formats.

TABLE 1 Seconds Elasped from Absolute Date in M/D/Y Reference Date andH/Min/Sec Format  418978800 seconds Apr. 12, 1983 at 7:00:00 1223637315seconds Oct. 10, 2008 at 11:15:15 1234567890 seconds Feb. 13, 2009 at23:31:30

Now that the concept of UNIX™ time has been introduced, the relationshipbetween the time base 186, relative timestamp, absolute timestamp, andabsolute system time 187 may be explored further.

FIG. 3A-3D are a series of timelines illustrating the relationship ofUNIX™ time variables, according to one embodiment of the invention. FIG.3A is a timeline illustrating UNIX™ time, according to embodiments ofthe invention. As shown, the timeline 300 begins at Jan. 1, 1970—thereference point for the UNIX™ Time Standard—and records the events of Xand Y. In one embodiment, Event X is when the external enclosure 120 ispowered on and the counter 130 begins to count based on the oscillator122. Event Y is the moment that the trending data component 132generates a relative timestamp for a status update which is transmittedto the computing system 170. As shown, the relative timestamp is thenumber of seconds that have elapsed since Event X (e.g., the number ofseconds between Event X and Y). For simplicity, assume that thecomputing system 170 receives the status data instantaneously—i.e.,transmitting the data does not create latency. The absolute time is thenumber of seconds that have passed between Jan. 1, 1970 and Event Y. Theabsolute system time 187 is the known UNIX™ time for the computingsystem 170 which, in this embodiment, is the same as the absolute timefor Event Y. Note that when the computing system 170 receives the firstcommunication from external enclosure (Event Y), the computing system170 is unaware of when the external enclosure 120 was powered on—i.e.,the computing system 170 has not yet established a time base 186 for theenclosure 120.

FIG. 3B is a timeline illustrating setting a conversion variable,according to one embodiment of the invention. As discussed above, thetime base 186 provides a conversion factor for converting a relativetimestamp to an absolute timestamp. As shown in FIG. 3B, the computingsystem 170 subtracts the first received relative timestamp from theabsolute system time 187. Doing so yields the time base 186, i.e.,yields the time that has elapsed from the reference date and when theexternal enclosure 120 was powered on (Event X). Again, assuming nolatency, the relative timestamp is the seconds that have elapsed fromEvent X and when the computing system 170 received the status data(Event Y).

FIG. 3C is a timeline illustrating the use of a conversion variable toidentify an absolute time, according to one embodiment of the invention.In FIG. 3C, the computing system 170 receives a second status updatefrom the external enclosure 120 (Event Z). Because the counter 130 onthe external enclosure 120 continually increases, the relative timestampfor Event Z provides the number of seconds that have passed since EventX. The time conversion system 182 adds the time base 186 to the newrelative timestamp to determine the absolute time for the transmitteddata. Because the computing system 170 may use the UNIX™ Time Standard,the absolute time may be converted to a TOD format using the processdescribed above with reference to FIG. 2.

Note, the absolute time for Event Z may have been calculated withoutstoring the time base 186 established in FIG. 3B in memory 178. Forexample, the time conversion system 182 may use the absolute system time187 corresponding to when the data was received to determine theabsolute timestamp. However, this ignores any latency issues which maycause several updates to be received in a relatively short period oftime even though they were measured on the hardware components over amuch longer period of time. Moreover, the external enclosure 120 maywait to send status data in chunks. For example, the trending datacomponent 132 may buffer status data and send several updates at once.Accordingly, without the relative timestamp and the time base 186, thetime conversion system 182 is unable to determine at what absolute timeeach update was measured by the hardware component.

FIG. 3D is a timeline illustrating a failure in the relative timestamp,according to embodiments of the invention. As shown in FIG. 3D, thecomputing system 170 has already used the first received relativetimestamp to create the time base 186. However, at Event A, the counter130 fails. The ability of the trending data component 132 to use thecounter 130 to generate relative timestamps may fail for at least threereasons: (1) the counter 130 has reached its greatest value and haswrapped (e.g., a two byte counter 130 has a maximum value of 0xFFFF andwill wrap to 0x0000) (2) the power to the external enclosure has beeninterrupted and caused the counter 130 to reset and (3) a poor qualityoscillator 122 may drift and fail to accurately record the chosen unitof time (e.g., seconds). As used herein, “failure” may refer to any ofthese occurrences, and thus, does not necessary imply that the counter130 has reset.

Returning to FIG. 3D, at Event A the counter (i.e., the relative time)130 fails. At Event B, the computing system 170 receives additionalstatus data from the hardware components. As shown, adding the time base186 to the new relative timestamp, however, ignores the time that haselapsed between Event X and Event A. Now, the computing system 170 canno longer correlate the three separate updates (i.e., Event Y, Z and B)because of the counter failure which occurred between Event Z and B. Thetime conversion system 182 should detect this failure and adjust thetime base 186 for Event B accordingly. Stated differently, the timeconversion system 182 will use a different time base 186 to determinethe absolute time for Event B than for Event Y and Z—i.e., multiple timebases are associated with the external enclosure 120. This process ofmaintaining and updating a time base 186 is shown by FIG. 4.

FIG. 4 illustrates a method for converting a received relative timestampto an absolute timestamp, according to one embodiment of the invention.At step 405, the default values for the variables stored at thecomputing system 170 for an external enclosure 120 are set. In oneembodiment, the default values set the time base 186 to zero. Theoscillator 122 on the external enclosure 120 begins to operate as soonas the enclosure 120 is powered. In one embodiment, the externalenclosure 120 does not have access to an outside source that may be usedto sync its oscillator 122 to the current time (i.e., a real-timeclock). Instead, the counter 130 records the amount of time that haspassed since the oscillator 122 began operation, or if the counter wasreset or wrapped, the amount of time that has passed since then.

At step 410, the computing system 170 waits for trending data from thehardware components attached to the expanded I/O slots 124 of theexternal enclosure 120. This trending data includes the status of thecomponents (i.e., temperature, energy consumption, functionality and thelike) and a relative timestamp. In one embodiment, trending datacomponent 132 associates a relative timestamp with the trending data foreach hardware component. In general, the relative timestamp provides thetime conversion system 182 on the computing system 170 when the trendingdata was measured on the hardware component.

The trending data component 132 then uses the I/O interface 138 to relaythe trending data and the relative timestamp to the computing system170. Typically, latency in communications results in the computingsystem 170 receiving either multiple updates from a single hardwarecomponent or multiple updates associated with separate hardwarecomponents. In either case, at step 415, the computing system 170processes the trending data using the time conversion system 182.

At step 420, the timestamp component 184 determines whether the receivedtimestamp is less than the preceding relative timestamp. Stateddifferently, the timestamp component 184 determines if time appears tobe moving backwards. As an example, assume that the counter 130 islimited to two bytes and the last received relative timestamp was0xFFFA. Subsequently, the timestamp component 184 receives additionaltrending data with a relative timestamp of 0x0003, signifying that thecounter 130 has wrapped. Accordingly, at step 425, the capacity of thecounter 130 (in the previous example, this is 0x10000) is added to thetime base 186. In one embodiment, the counter capacity may not be knownto the timestamp component 184. In such as case, the timestamp component184 communicates with the external enclosure 120 to determine thecounter capacity before ascertaining whether the counter 130 haswrapped. Nonetheless, adding the capacity of the counter 130 to the timebase 186 overcomes the effects of a limited capacity counter.

At step 430, the timestamp component 184 determines the absolute systemtime 187. In one embodiment, the absolute system time 187 is the numberof seconds that have elapsed since Jan. 1, 1970 (i.e., UNIX™ StandardTime) and when the timestamp component 184 receives the trending datafrom the external enclosure 120. As mentioned above, the externalenclosure 120 may transmit trending data with various relativetimestamps, or latency may cause several updates to arrive at once. Ifmultiple updates were assigned the same absolute system time 187 astheir absolute timestamp, the status data may be clumped together ratherthan spread out evenly based on the time the updates were measured onthe hardware components. Though the timestamp component 184 does not usethe absolute system time 187 to convert the relative timestamps, becausethe counter 130 may fail, the timestamp component 184 does compare therelative timestamps with the absolute system time 187 to detect acounter 130 failure.

At step 435, if the trending data is the first data received from theexternal enclosure 120, the time base 186 should be calculated. Eachexternal enclosure 120 has at least one time base 186 associated withthe trending data received from that enclosure 120. In one embodiment, aplurality of external enclosures may be connected to the computingsystem 170. Because these enclosures may have been powered on atdifferent times, the time base 186 for each may be different. Moreover,different trending data received from the same external enclosure 120may be associated with different time bases 186. For example, referringagain to FIG. 3D, Events Y and Z (i.e., received trending data) areassociated with the labeled time base; however, because of the counterfailure, Event B must be associated with a different (or updated) timebase 186 to be correctly correlated to Event Y and Z.

The timestamp component 184 uses the correlation between the relativetimestamp and the absolute system time 187 to determine whether a timeskew has occurred. In general, a time skew occurs whenever the counter130 experiences a failure (e.g., clock drift, power failure or wrappingmultiple times). But it may also arise because of latency between theexternal enclosure 120 and computing system 170. Specifically, thetimestamp component 184 adds the time base 186 to the relative timestampof received data to create a predicted absolute time. This predictedabsolute time is then compared to the correlated absolute system time187. If the predicted time is within a pre-determined delta (i.e., athreshold value) of the absolute system time 187, then the timestampcomponent 184 may assume that a failure did not occur. For example, ifthe time base 186 plus a received relative timestamp yields a predictedabsolute time of 0x50010000 seconds while the absolute system time 187is 0x50030000 seconds and the delta is sixty seconds, then the timestampcomponent 184 detects that a time skew has occurred (in this case, atwo-byte counter 130 has probably wrapped twice). Note that thetimestamp component 184 does not need to distinguish between thedifferent types of failures. As a further example, assume that thepre-determined delta is sixty seconds and that the predicted absolutetime is sixty-two seconds off from the absolute system time 187. Thisdifference could have been caused be either a poor oscillator (i.e.,drift) or latency. In general, the pre-determined delta determines thesensitivity of the time conversion system 182 to all types of failures.As such, the smaller the delta, the more likely a time skew will bedetected. In one embodiment, however, the timestamp component 186 maydetermine the type of failure and use a customized delta for each type.

At step 445, the timestamp component 184 calculates a new time base 187if it detects either that this is the first time that data was receivedfrom the external enclosure, or a time skew occurred. In either case,the timestamp component 184 subtracts from the absolute system time 187the relative timestamp to yield the new time base 186.

At step 450, the absolute timestamp for the trending data is calculated.Because the timestamp component 184 now has the correct time base 186,this time base 186 is added to the relative timestamp associated withthe trending data to give the absolute timestamp. In one embodiment, anabsolute timestamp measured in UNIX™ time, which is typically recordedin seconds, and may be converted to give a TOD format. At step 455, thisformat may then be displayed on a client system 110 to illustrate thetrending data. Alternatively, the trending data and the absolutetimestamp may be used in AEM to measure, monitor and manage the energyconsumed by the hardware component. Following step 455, the processreturns to step 410 to wait for additional trending data.

In another embodiment, the timestamp component 184 may receive multipleupdates with relative timestamps. To supplement the process discussed inFIG. 4, the timestamp component 184 may evaluate the multiple updatestogether. In one embodiment, the trending data component 132 may sendmultiple updates to the computing system 170 which may include both newand old updates—i.e., the trending data component 132 sends whateverupdates are still stored in its buffer regardless of whether the updateshave been sent previously. Accordingly, the timestamp component 184 mayevaluate the received data points and determine if it has processed anyof the data points before. If so, then it is unlikely that the counter130 has wrapped multiple times since the received updates still containold information. Conversely, if the received data points consist ofentirely new updates, then the timestamp component 184 may decide torecalculate the time base 186 on the assumption that some failure hasoccurred.

In one embodiment, the time conversion system may store both the old andnew time base 186 for an external enclosure 120. For example, in asituation where the timestamp component 184 simultaneously processesmultiple data points from an enclosure 120, assume that one data pointhas a relative timestamp of 0xFFFE seconds and another data point has arelative timestamp of 0x0003 seconds. In this case, the timestampcomponent 184 detects that the counter 130 has wrapped, and for everydata point with a relative timestamp within a pre-determined delta of0xFFFE seconds, the old time base is used to calculate the absolutetimestamp, but for every data point with a relative timestamp within apre-determined delta of 0x0003 seconds the new time base is used.

Advantageously, embodiments of the invention allow a computing system toreconcile the relative timestamps associated with hardware in anexternal enclosure with an absolute time reference (e.g., UNIX™ time).Doing so allows an external enclosure to transmit data with anassociated timestamp based on an independent event that may be convertedto the absolute time reference. Accordingly, the converted timestampsmay be used to organize the transmitted data to identify trends.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality and operation of possible implementations ofsystems, methods and computer program products according to variousembodiments of the present invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

While the foregoing is directed to embodiments of the present invention,other and further embodiments of the invention may be devised withoutdeparting from the basic scope thereof, and the scope thereof isdetermined by the claims that follow.

What is claimed is:
 1. A method of converting a timestamp between acomputing system and a subsystem of the computing system, comprising:receiving a relative timestamp from the subsystem; upon determining thata time skew has occurred based on the relative timestamp and a timebase, updating the time base by operation of one or more computerprocessors, wherein the time base is a conversion variable forconverting the relative timestamp to an absolute timestamp, if the timebase is updated, determining the absolute timestamp based on therelative timestamp and the updated time base, wherein the absolutetimestamp is a timestamp of a time measure used by the computing system;and if the time base is not updated, determining the absolute timestampbased on the relative timestamp and the time base.
 2. The method ofclaim 1, wherein determining that the time skew has occurred comprises,adding the time base to the relative timestamp to yield a predicted timeof transmission; and determining whether the predicted time oftransmission is within a pre-defined delta from an absolute system time,wherein the absolute system time is a timestamp of the time measure usedby computing system and indicates when the relative timestamp wasreceived.
 3. The method of claim 1, wherein updating the time basecomprises subtracting the relative timestamp from an absolute systemtime, wherein the absolute system time is a timestamp of the timemeasure used by computing system and indicates when the relativetimestamp was received.
 4. The method of claim 1 wherein adding therelative timestamp to the time base yields the absolute timestamp. 5.The method of claim 1, further comprising receiving, with the relativetimestamp, received data that includes at least one of the following: atemperature of a hardware component in the subsystem and an energyconsumed by the hardware component in the subsystem.
 6. The method ofclaim 1, further comprising, determining whether a counter has wrappedbased on a first relative timestamp and a second relative timestamp,wherein the counter generates both of the relative timestamps; and upondetermining the counter has wrapped, adding a greatest value that can bestored by the counter to the time base.
 7. The method of claim 1,further comprising, upon determining that the relative timestamp is afirst communication from the computing system, establishing the timebase by subtracting the relative timestamp and an absolute system time,wherein the absolute system time is a timestamp of the time measure usedby computing system and indicates when the relative timestamp wasreceived.
 8. The method of claim 1, wherein the subsystem is an externalenclosure that provides connections for hardware components, thehardware components expanding the computational abilities of thecomputing system.